#include <iostream>

#include "cppTutorVirtualFuncReturnOverride.h"

using namespace std;

CcppTutorVirtualFuncReturnOverride :: CcppTutorVirtualFuncReturnOverride () {
    cout << "ENTER : CcppTutorVirtualFuncReturnOverride :: CcppTutorVirtualFuncReturnOverride" << endl;
    //vfro = new CcppTutorVirtualFuncReturnOverride ();
    cout << "EXIT  : CcppTutorVirtualFuncReturnOverride :: CcppTutorVirtualFuncReturnOverride" << endl;
}

CcppTutorVirtualFuncReturnOverride :: ~CcppTutorVirtualFuncReturnOverride () {
    cout << "ENTER : CcppTutorVirtualFuncReturnOverride :: ~CcppTutorVirtualFuncReturnOverride" << endl;
    //delete vfro;
    cout << "EXIT  : CcppTutorVirtualFuncReturnOverride :: ~CcppTutorVirtualFuncReturnOverride" << endl;
}

CcppTutorVirtualFuncReturnOverride* CcppTutorVirtualFuncReturnOverride ::test () {
    cout << "ENTER : CcppTutorVirtualFuncReturnOverride :: test" << endl;
    cout << "EXIT  : CcppTutorVirtualFuncReturnOverride :: test" << endl;    
    return vfro;
}

CDerivedVFRO :: CDerivedVFRO () {
    cout << "ENTER : CDerived :: CDerived" << endl;
    //drv = new CDerived ();
    cout << "EXIT  : CDerived :: CDerived" << endl;
}

CDerivedVFRO :: ~CDerivedVFRO () {
    cout << "ENTER : CDerived :: ~CDerived" << endl;
    //delete drv;
    cout << "EXIT  : CDerived :: ~CDerived" << endl;
}

CDerivedVFRO* CDerivedVFRO :: test ()
{
    cout << "ENTER : CDerived :: test" << endl;
    cout << "EXIT  : CDerived :: test" << endl;    
    return drv;
}